import { NgModule } from '@angular/core';
import { RouterModule, Routes } from '@angular/router';
import { ChatIndexComponent } from './chat-index/chat-index.component';
import { EmptyChatComponent } from './components/empty-chat/empty-chat.component';
import { ChatRoomComponent } from './components/chat-room/chat-room.component';

const routes: Routes = [
  {
    path: '',
    component: ChatIndexComponent,
    children: [
      {
        path: '',
        component: EmptyChatComponent,
      },
      {
        path: ':id',
        component: ChatRoomComponent,
      }
    ]
  }
];

@NgModule({
  imports: [RouterModule.forChild(routes)],
  exports: [RouterModule],
})
export class MessageRoutingModule {}
